package com.yztc.love_travel.helper.weather;

import android.content.Context;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.content.res.AssetManager;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;



import java.io.IOException;
import java.io.InputStream;

public class SharedPrefrencesHelper {
    private static final String BG_PIC_PATH = "bg_path";
    private static final String CITY_NAME = "city";
    private SharedPreferences mPreferences = null;
    private Editor mEditor = null;

    public SharedPrefrencesHelper(Context context) {
        mPreferences = context.getSharedPreferences("info_app", Context.MODE_PRIVATE);
        mEditor = mPreferences.edit();
    }
    public void saveCity(String city) {
        mEditor.putString(CITY_NAME, city);
        mEditor.commit();
    }
    public String getCity() {
        return mPreferences.getString(CITY_NAME, "北京");
    }
}
